package com.clms.statistics.controller;

import com.clms.common.R;
import com.clms.statistics.service.OrderService;
import com.clms.statistics.service.ULogService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: clms-third
 * @description:订单统计的实现层
 * @author: 许鹏
 * @create: 2021-07-24 15:34
 **/
@RestController
@RequestMapping("statistics")
@ApiModel(value = "统计图的调用层 ")
public class OrderController {

    @Resource
    @ApiModelProperty(value = "调用收入统计service")
    private OrderService orderService;
    @Resource
    @ApiModelProperty(value = "调用操作记录的service")
    private ULogService uLogService;

    @PostMapping ("/selectTbOrder/{value2}")
    @ApiModelProperty(value = "收入统计")
    public R TbOrder(@PathVariable("value2") String ymonth){

        return orderService.TbOrder(ymonth);
    }


    @PostMapping("/logdata/{value3}")
    @ApiModelProperty(value = "查询调用操作记录")
    public R getudata(@PathVariable("value3") String years) {
        return uLogService.Ulog(years);
    }

}
